package com.demo.web.service.impl;

import com.demo.web.dao.ITestDao;
import com.demo.web.service.ITestServer;
import com.jweb.framework.db.annotation.Transaction;
import com.jweb.framework.ioc.annotation.Autowired;
import com.jweb.framework.ioc.annotation.Value;
import com.jweb.plugins.rpc.annotation.RpcProvider;
import com.jweb.plugins.rpc.impl.handler.ServiceType;

/**
 * 开启RPC的服务提供者
 * 
 * @author Yuanqy
 *
 */
@RpcProvider(iface = ITestServer.class, serviceType = ServiceType.Scoket)
public class TestServerRPC2Impl implements ITestServer {
	private @Value("testMsg") String msg;

	private @Autowired ITestDao dao;

	@Override
	@Transaction
	// 开启事务
	public String getMsg() {
		return msg + dao.getNow() + "[This is Scoket RPC]";
	}

}
